package com.niit.mobileDevide.batterydrain;

import org.apache.hadoop.io.Writable;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class BatteryDrainBean implements Writable {

    private int count;

    public BatteryDrainBean() {}

    public BatteryDrainBean(int count) {
        this.count = count;
    }

    @Override
    public void write(DataOutput out) throws IOException {
        out.writeInt(count);
    }

    @Override
    public void readFields(DataInput in) throws IOException {
        count = in.readInt();
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    @Override
    public String toString() {
        return String.format("%d", count);
    }
}